<?php


namespace app\partneradmin\validate;


use think\Validate;

class MemberConfig extends Validate
{
    //字段规则
    protected $rule = [
        'name' => 'require',
        'identify' => 'require',
        'price' => 'require',
        'privilege' => 'require',
    ];

    //验证器提示信息
    protected $message = [
        'name.require' => '会员名字（中文不能为空）',
        'identify.require' => '会员唯一标识',
        'price.require' => '会员价格',
        'privilege.require' => '会员价格',
    ];

    //使用场景
    protected $scene = [
        'add' => ['name', 'identify', 'price', 'privilege'],
        'edit' => ['name', 'identify', 'price', 'privilege'],
    ];
}